<div class="page-content">

  <section class="errormsgDiv"   v-if="nodata">
    <p class="errormsg">\（￣︶￣）/</p>
    <p class="errormsg2">您还没有创建地址哦</p>
 </section>

<!-- 地址列表 -->
<div class="weui_cells weui_cells_checkbox"  v-else style="margin-top:0">
   

      <label class="weui_cell weui_check_label" v-for="(item,index) in listData" >
         <!--  <div class="weui_cell_hd"  @click="selectAddress(index)">
             
              <i class="weui_icon_checked"></i>
          </div> -->
          <div  class="weui_cell_bd weui_cell_primary"  @click="selectAddress(index)">
              <p><b>{{item.userName}}，{{item.telNumber}}</b></p>
              <p>{{item.provinceName}}{{item.cityName}}{{item.countyName}}{{item.detailInfo}}</p>
          </div>
          <div class="weui_cell_hd" @click="newAddress(index)">
              <i class="icon iconfont icon-xiugai"></i>
          </div>

      </label>
  </div>


  <div class="goods-bottom-fix" >
      <div class="btn btn2 w100" style="padding: 10px 12px;" @click='newAddress()'>新增地址</div>  
  </div>

  <!-- 地址新增 -->
  <form  id="formNewAddress" :class="showNewAddress?'weui_dialog_alert':'weui_dialog_alert hidden'" >
    <div class="weui_mask" style="    z-index: 2;" v-on:click="hideNewAddress()"></div>
    <div class="weui_dialog" style="width:90%;z-index: 3">
        <div class="weui_dialog_hd"><strong class="weui_dialog_title">编辑收货地址</strong></div>
        <div class="weui_dialog_bd" style="padding:0">
             <div class="weui_cells weui_cells_form">
                <div class="weui_cell"  v-if="isWeiXin" @click="openAddress">
                        <div class="weui_cell_hd"><label style="width: 100%; color: #98840b" class="weui_label">
                          使用微信收货地址 [ 推荐 ]
                      </label></div>
                         
                    </div>

                    <div class="weui_cell">
                        <div class="weui_cell_hd"><label style="width: 76px;" class="weui_label">姓名</label></div>
                        <div class="weui_cell_bd weui_cell_primary">
                            <input class="weui_input" type="text" name="userName" :value="editData.userName" placeholder="请输入姓名">
                            <input type="hidden" name="id" :value="editData.id">
                        </div>
                    </div>
                    <div class="weui_cell">
                        <div class="weui_cell_hd"><label style="width: 76px;"   class="weui_label">电话</label></div>
                        <div class="weui_cell_bd weui_cell_primary">
                            <input class="weui_input" type="number" name="telNumber" :value="editData.telNumber"  placeholder="请输入电话">
                        </div>
                         
                    </div>

                    <div class="weui_cell"  >
                        <div class="weui_cell_hd"><label style="width: 76px;"  class="weui_label">地区</label></div>
                        <label  for="areaAddress" class="weui_cell_bd weui_cell_primary">
                            <input id="areaAddress" :value="editData.provinceName && (editData.provinceName + editData.cityName + editData.countryName)"  class="weui_input" type="text" placeholder="请输入地区">
                        </label>
                    </div>
                    <div class="weui_cell">
                        <div class="weui_cell_hd"><label  style="width: 76px;"  class="weui_label">详细地址</label></div>
                        <div class="weui_cell_bd weui_cell_primary">
                            <input class="weui_input" type="text" name="detailInfo" :value="editData.detailInfo" placeholder="请输入详细地址">
                        </div>
                        
                    </div>
                </div>
            <div style="padding: 20px 10px;">
            <div class="btn btn2 w100" @click='saveAddress()'>保存并使用</div>  
             <div class="btn btn3 w100 mgt10" @click='delAddress()'>删除收货地址</div> 
           </div> 

        </div>
         <div class="weui_dialog_ft">
            <a href="javascript:;"  v-on:click="hideNewAddress()" class="weui_btn_dialog primary">关闭</a>
        </div>
        
    </div>
</form>
  <!-- 地址新增 -->

</div>
